package com.adam.springbucks.aop;

//自定义运行时异常
public class BucksException extends RuntimeException{
    private int errCode = ResCode.UNKNOWN.getCode();

    public BucksException(){};
    public BucksException(ResCode resCode){
        super(resCode.getInfo());
        this.errCode = resCode.getCode();
    }

    public int getErrCode() {
        return errCode;
    }

    public void setErrCode(int errCode) {
        this.errCode = errCode;
    }
}